package com.pig4cloud.pigx.knowledge.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.pig4cloud.pigx.knowledge.entity.AiDocumentEntity;
import com.pig4cloud.pigx.knowledge.entity.AiSliceEntity;
import com.pig4cloud.pigx.knowledge.support.constant.SliceStatusEnums;

import java.util.List;

public interface AiSliceService extends IService<AiSliceEntity> {

	/**
	 * 通过id删除切片和嵌入向量
	 * @param sliceIdList id 列表
	 */
	Boolean removeSliceAndEbeddingById(List<Long> sliceIdList);

	/**
	 * 异步更新切片的命中次数 & 文档的命中次数
	 * @param collect
	 */
	void updateHitCount(List<String> collect);

	/**
	 * 嵌入切片
	 * @param documentEntity Document 实体
	 * @param sliceStatusEnums 切片状态枚举
	 */
	void embedSlice(AiDocumentEntity documentEntity, SliceStatusEnums sliceStatusEnums);

}
